﻿using System;
using System.Windows.Data;
using System.Windows;

namespace AccessControl.Wpf.Converters
{
	class IsNullToVisibilityConverter : IValueConverter
	{
		#region Public Properties

		public Visibility TrueValue { get; set; }
		public Visibility FalseValue { get; set; }

		#endregion

		#region IValueConverter Members

		public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			if (value == null)
				return TrueValue;

			return FalseValue;
		}

		public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			throw new NotImplementedException();
		}

		#endregion
	}
}
